package com.csnf.service;

import com.csnf.dao.UserDao;
import com.csnf.entity.User;

import java.sql.SQLException;
import java.util.List;

public class UserService {
    UserDao userDao = new UserDao();
    public List<User> getAll() throws SQLException {
        return userDao.getAll();
    }

    public List<User> getAllByNickname(String nickName) throws SQLException {
        return userDao.getUserByNickname(nickName);
    }

    public User getUserById(Integer user_id) throws Exception {
        return userDao.grtUserById(user_id);
    }

    public boolean getUserName(Integer user_id, String user_name, String user_nickname) throws Exception {
        return userDao.getUserName(user_id,user_name,user_nickname);
    }
}
